home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
bin
/
.emacsrc
next >
Wrap
Text File
|
1995-07-24
|
7KB
|
244 lines
; EMACS.RC: Standard MicroEMACS Startup program
; for MicroEMACS 3.12 and above
; (C)opyright 1987,92 by Daniel M Lawrence
; Last Update: 12/28/92
; Modified 06.06.93 Hops
; Modded 08.12.94 for shift left, right and backtab ( modified xterm )
;set $discmd FALSE
write-message "[Setting up....]"
; If you hate clocks or position counters, comment these
;set $timeflag TRUE
;set $posflag TRUE
; Allow partial match, autonaming of dup buffers, disallow autoend on completion
; 1 = allow partial match, 2 = allow auto name dup bfrs, 4 = autoend on comp.
set $uconfig 3
; set list of suffixes to exclude from file completion
set $exclsfx ".o.a.z.Z"
; disable safe save so get told when writing onto non writable files
set $ssave "FALSE"
; Set Default Global modes
;add-global-mode "cyan"
;add-global-mode "BLACK"
;add-mode "blue"
;add-mode "WHITE"
; Scoterm
add-global-mode "white"
add-global-mode "BLACK"
add-mode "white"
add-mode "BLACK"
set $discmd "FALSE"
write-message "[Setting up....]"
; setup fn keys
;set $palette "KEYMAP FNV ~~" ; PgDwn
;set $palette "KEYMAP FNZ ~~" ; PgUp
set $palette "KEYMAP FN< H" ; Home
set $palette "KEYMAP FN> ~~" ; End
set $palette "KEYMAP FN< ~~" ; Home
set $palette "KEYMAP FN> ~~" ; End
set $palette "KEYMAP FNC ~~" ; Insert
; fnkey mappings keyboard -> virtual
set $palette "KEYMAP FN1 ~~" ; F1
set $palette "KEYMAP FN2 ~~" ; F2
set $palette "KEYMAP FN2 ~~" ; F3
set $palette "KEYMAP FN4 ~~" ; F4
set $palette "KEYMAP FN5 ~~" ; F5
set $palette "KEYMAP FN6 ~~" ; F6
set $palette "KEYMAP FN7 ~~" ; F7
set $palette "KEYMAP FN8 ~~" ; F8
set $palette "KEYMAP FN9 ~~" ; F9
set $palette "KEYMAP FN0 ~~" ; F10
set $palette "KEYMAP FN^1 ~~" ; F11
set $palette "KEYMAP FN^2 ~~" ; F12
set $palette "KEYMAP FNb d" ; Shift Left
set $palette "KEYMAP FNf c" ; Shift Right
set $palette "KEYMAP FNI Z" ; BackTab
; set up auto CMODE
store-procedure set-default-mode
set %rctmp &sin $cfname "."
!if &equ %rctmp 0
!return
!endif
set %rctmp &mid $cfname &add %rctmp 1 5
!if &or &seq %rctmp "c" &seq %rctmp "h"
add-mode "cmode"
!endif
!if &or &seq %rctmp "cpp" &seq %rctmp "hpp"
add-mode "cmode"
!endif
!if &seq %rctmp "mss"
add-mode "wrap"
!endif
!endm
set $readhook set-default-mode
bind-to-key set-mark ^@
bind-to-key hunt-forward ^\
bind-to-key hunt-backward ^_
bind-to-key delete-next-word ^]
;bind-to-key next-page FNZ ; PgDwn
;bind-to-key previous-page FNV ; PgUp
bind-to-key copy-line ^X+
bind-to-key kill-line ^X-
bind-to-key move-window-down ^Z
bind-to-key open-above ^O
bind-to-key move-window-up M-Z
bind-to-key next-buffer ^X^N
bind-to-key previous-buffer ^X^P
bind-to-key suspend-emacs ^XZ
bind-to-key yank FNC ; Ins Key
; bind-to-key i-shell M-Z ; Alt-Z
; bind-to-key copy-line M-C ; Alt-c
bind-to-key copy-region ^C ; instead of M-C
; Fn key bindings
bind-to-key help FN1
;++ bind-to-key realign-line FN2
; bind-to-key begin-macro FN7 ;++ code to end macro on begin-macro
bind-to-key begin-macro FN6
bind-to-key end-macro FN7
bind-to-key execute-macro FN8
bind-to-key execute-named-command FN0 ; F10
bind-to-key beginning-of-line FN<
bind-to-key end-of-line FN>
bind-to-key next-word FNf ; shift left
bind-to-key previous-word FNb ; shift right
; rebind insert-file
bind-to-key insert-file ^XI
unbind-key ^X^I
; Add undo key binding ( replace Upcase region )
bind-to-key undo ^X^U
21 store-macro ; Toggle ins/Ovr Mode
set $discmd FALSE
!if &band $cmode 32
delete-mode OVER
!else
add-mode OVER
!endif
set $discmd TRUE
!endm
bind-to-key execute-macro-21 M-I ; Alt-i - Ins Toggle
bind-to-key execute-macro-21 FNC ; Insert key ( test )
22 store-macro /* insert date at point */
set %d $date ; have $time but fmt is shitty - get YYMMDD
set %od &mid %d 5 2 ; DD - YY 5 2
set %od &cat %od "-"
set %mm &mid %d 3 2 ; MM
set %oo &add × &sub %mm 1 3 1 ; oo = ((mm-1)* 3) + 1
set %mm &mid "JanFebMarAprMayJunJulAugSepOctNovDec" %oo 3
set %od &cat %od %mm ; Mmm
set %od &cat %od "-"
set %od &cat %od &mid %d 1 2 ; YY - YY 1 2
insert-string %od
; DD.MM.YY
; set %od &mid %d 5 2 ; DD - YY 5 2
; set %od &cat %od "."
; set %od &cat %od &mid %d 3 2 ; MM
; set %od &cat %od "."
; set %od &cat %od &mid %d 1 2 ; YY - YY 1 2
; MM.DD.YY
; set %od &mid %d 3 2 ; MM - YY 1 2
; set %od &cat %od "."
; set %od &cat %od &mid %d 5 2 ; DD
; set %od &cat %od "."
; set %od &cat %od &mid %d 1 2 ; YY - YY 5 2
!endm
bind-to-key execute-macro-22 ^XD ; insert date at point
;;++ Mod these to use autoload macro....
; load tags macro
23 store-macro
; set %f &cat &env "HOME" "/bin/tags.uem"
set %f "/usr/skunk/lib/tags.uem"
execute-file %f ; rebinds ^XT
execute-macro-25 ; do tags cmd
!endm
; load srch data at point macro
24 store-macro
; set %f &cat &env "HOME" "/bin/srch.uem"
set %f "/usr/skunk/lib/srch.uem"
execute-file %f ; rebinds ^XH
execute-macro-26 ; do srch cmd
!endm
; load srch data at point macro
27 store-macro
; set %f &cat &env "HOME" "/bin/jfile.uem"
set %f "/usr/skunk/lib/jfile.uem"
execute-file %f ; rebinds macro 27 - ^XJ
;write-message "running macro now"
execute-macro-28 ; do file load
!endm
bind-to-key execute-macro-22 ^XD ; insert data at point
bind-to-key execute-macro-23 ^XT ; load tags macro
bind-to-key execute-macro-24 ^XH ; load srch_data_at_point macro
bind-to-key execute-macro-27 ^XJ ; load filename under csr
; Force looping at cli line getting input and execing till no more input
store-procedure loop-cli
set %cline @"!"
!while ¬ &sequal %cline ""
!force shell-command %cline
set %cline @"[End]"
!endwhile
!endm
macro-to-key loop-cli ^X!
store-procedure sccsid1
insert-string "%Z% %M% %I% %D% %Q%"
!endm
macro-to-key sccsid1 ^X"
store-procedure sccsid2
insert-string "#ifndef lint\n"
insert-string "char *sccsid[] = \"%Z% %M% v %I% %D%\";\n"
insert-string "#endif /* lint */\n"
!endm
macro-to-key sccsid2 ^X'
store-procedure mkwrt
delete-mode VIEW
set %cline &catstr "chmod +w " $cfname
shell-command %cline
!endm
macro-to-key mkwrt ^X*
set $sterm "" ; search termin char to nl
set $isterm "" ; isearch termin char to nl
set $paralead "" ; paralead to dbl nl
; set $wchars ""
4 handle-tab
;set $discmd TRUE
;write-message "[EMACS is ready]"